home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 232 / 232.d81 / adventure shell (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  778b  |  22 lines

  1. 100 v=0:n=0:ne$="":n$="":n2$="":v$="":v2$="":pr=0:pt=0:nm=0:bz=0
  2. 101 forx=1to10:wd$(x)="":next
  3. 102 inputa$:pt=1:nm=0:d$=a$
  4. 103 fora=1tolen(d$)
  5. 104 ifmid$(d$,a,1)=" "thena$=mid$(d$,pt,a-pt):pt=a+1:nm=nm+1:wd$(nm)=a$
  6. 105 next:nm=nm+1:a$=mid$(d$,pt,a-pt):wd$(nm)=a$
  7. 106 v$=wd$(1):ne$=wd$(2)
  8. 107 ifwd$(3)="and" orwd$(3)="then"thenv2$=wd$(4):n2$=wd$(5):co=1
  9. 108 ifwd$(3)="in"orwd$(3)="from"orwd$(3)="to"thenv$=wd$(1):ne$=wd$(2):pr=1:bz=1
  10. 109 rem     ---------------------
  11. 110 v=0:forx=1to20:ifv$=vb$(x)thenv=x:x=30
  12. 111 next:ifv=0thenprint"[215]hat? [195]heck your verb.":goto100
  13. 112 n=0:forx=1to299:ifne$=no$(x)thenn=x:x=299
  14. 113 next:ifn=0thenprint"[200]uh? [195]heck your noun.":goto100
  15. 114 on v gosub120,130,140,150,160,170,180,190,200,210
  16. 115 ifco=1thenco=0:goto110
  17. 116 goto100
  18. 117 rem     ----------------------
  19. 9999 end
  20. 10000 d=peek(186):open15,d,15,"i0":n$="adventure shell"
  21. 10001 print#15,"s0:"+n$:close1:saven$,d:end
  22.